package com.mvp.dagger.modules;

import android.app.Application;
import android.content.Context;

import dagger.Module;
import dagger.Provides;

/**
 * Created by zhangyuncai on 2018/9/11.
 */

@Module
public class ApplicationModule {

    private final Application app;


    public ApplicationModule(Application app) {
        this.app = app;
    }

    @Provides
    public Application providesApplication() {
        return app;
    }

    @Provides
    public Context providesContext() {
        return app.getApplicationContext();
    }



}
